package cn.bingo.yunsj.common.exception;

/**
 * 我们自己得异常
 */
public class OwnException extends RuntimeException{

    private CommonException commonException;

    public OwnException(CommonException commonException){

        this.commonException = commonException;
    }

    public OwnException(CommonException commonException, String message){
        commonException.setErrMessage(message);
        this.commonException =commonException;
    }

    public int getCode() {
        return commonException.getErrCode();
    }

    public String getMessage() {
        return commonException.getErrMessage();
    }
}
